* {
  margin: 0;
  padding: 0;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px;
  list-style: none;
}

.menu .menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.3s;
}

/* 开关底座 */
.menu-item .switch {
  display: block;
  width: 32px;
  height: 18px;
  position: relative;
  border-radius: 10px;
  background-color: #fff;
  border: 1px solid #0000001a;
  box-sizing: content-box;
  cursor: pointer;
  transition: 0.3s;
  overflow: hidden;
}

/* 开关拨块，默认关闭 */
.menu-item .switch::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0;
  display: block;
  width: 18px;
  height: 18px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 3px #00000033, 0 0 1px #00000033;
  transition: 0.3s;
}

/* 开关拨块，开启样式 */
.menu-item .switch.active {
  background-color: #2ccf5a;
}

.menu-item .switch.active::before {
  left: 14px;
}
